<%-- 
    Document   : purchase
    Created on : Apr 16, 2013, 4:47:45 AM
    Author     : lohris
--%>

<%@page import="entity.bean.Show"%>
<%@page import="entity.bean.Movie"%>
<%@page import="java.util.Enumeration"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>

        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Movie info </title>
    </head>
    <body>
        <%
            Movie selectedMovie = (Movie) session.getAttribute("selectedMovie");
            Show[] shows = (Show[]) request.getAttribute("shows");
            int noOfShows = ((Integer) request.getAttribute("noOfShows")).intValue();
        %>
        <div id="container">
            <div id="header">
                <div class="noncontent" id="logo">
                    <span>
                        <img src="image/logo.jpg" width="200" height="200" alt="logo"/>
                    </span>
                </div>

                <div class="noncontent" id="title">
                    <h1>Cult Cinema</h1>
                </div>
            </div>

            <div id="body">

                <div id="content">
                    <div id="Menu">
                        <a href="index.jsp">Home</a>
                        <a href="Index">Movies</a>
                    </div>
                    <div id="MovieInfo">
                        <img src="image/mov<%=selectedMovie.getId()%>.jpg" title="mov<%=selectedMovie.getId()%>" width="150" height="150" alt="mov<%=selectedMovie.getId()%>"/>
                        <p>Movie Name:${selectedMovie.name}</p>
                        <p>categories:${selectedMovie.categary}</p>
                        <p>Role:${selectedMovie.cast}</p>
                        <p>Director:${selectedMovie.director}</p>
                        <p>duration:${selectedMovie.duration}</p>
                        <p>Language:${selectedMovie.language}</p>
                        <p>Description:${selectedMovie.synopsis}</p><br/>


                        <form action="MovieInfo" method="POST">
                            <select name="selectedTimeSection">
                                <%for (int i = 0; i < noOfShows; i++) {%>
                                <option value="<%=i%>"><%=shows[i].getTimeString()%>, House<%=shows[i].getHouseID()%> $<%=shows[i].getPrice()%></option>
                                <%}%>
                            </select>
                            <input type="submit" value="buy"/>
                        </form>
                    </div>
                </div>
            </div>

            <div class="noncontent" id="footer">
                <span>
                    <a href="" >Privacy Policy</a>
                    <a href="" >Terms Conditions</a>
                    <a href="" >About Us</a> 
                    <a href="" >Contact Us</a>
                </span>
                <br/>
                <span id="designer">Designed by - Chris Ng, Lusinda Leung<br/></span>
                <span id="copyright">
                    This web site exists to fulfill the coursework requirement of CS4280. Do not use your real	personal data as input.
                </span>
            </div>
        </div>
    </body>
</html>
